#include "card.h"
#include <iostream>
#include <string>
using namespace std;

int main(int argc, char *argv[])
{
	Game gm;
	string cmd;
	gm.usage();
	while(cin>>cmd)
	{
		if(cmd=="start")
		{
			gm.start();
			cout<<"please ante"<<endl;
		}
		if(gm.isstart())
		{
			if(cmd=="show")
				gm.show();
			if(cmd=="ante")
			{
				int money; 
				if(cin>>money)
				{
					if (!money)
						money=1;
					if(!gm.ante(money))
						cout<<"please ante"<<endl;
					else
					{
						gm.stakeAdd(money*2);
						gm.deal();
					}
				}
				else
				{
					cout<<"please ante"<<endl;
				}
			}
			if(cmd =="help")
			{
				gm.usage();
			}
		}
	}
	return 0;
}

